import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
public class Main {
    public static int max(int a,int b){
        if(a > b){
            int tamp = a;
            a = b;
            b = tamp;
        }
        return b;
    }
    public static int max1(int a,int b,int c){
        if(a > b){
            int tamp = a;
            a = b;
            b = tamp;
        }
        if(b > c){
            int tamp = b;
            b = c;
            c = tamp;
        }
        return c;
    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();


        System.out.println(max(a,b));
        System.out.println(max1(a,b,c));
        scan.close();
    }
}